<style lang="scss" scoped>
  .box {
    display: flex;
    padding-top: 13px;
    -webkit-transition-duration: 0ms;
    transition-duration: 0ms;
    -webkit-transform: translate3d(145px, 0px, 0px);
    transform: translate3d(145px, 0px, 0px);
  }

  .cinema_nav {
    background-color: #40454d;
    width: 376px;
    overflow: scroll;
  }

  .cinema_list {
    display: inline-block;
    vertical-align: top;
    padding: 0 15px;
  }
</style>



<template>
  <div class="cinemaDetail">
    <div class="cinemaName">
      <h1>万达影城</h1>
    </div>
    <div>
      <div class="cinema_nav">
        <div class="box">
          <div class="cinema_list" v-for="(item,index) in test" :key="index">
            <img :src="[item.img.replace('w.h','100.150')]" />
          </div>
        </div>
      </div>
      <div>This is moviename</div>

      <div>This is DataList</div>
    </div>
  </div>
</template>


<script>
  import axios from "axios";
  import {
    constants
  } from "crypto";
  import api from "../utils/api.js";
  export default {
    name: "home",
    data() {
      return {
        test: "",
        cinemaId: 2062,
        movieId: '1218141',
      };
    },
    methods: {
      loadMore() {
        console.log("加载更多");
      }
    },
    created() {
      //影院排片
      let cinemaDetail = '/cinemaDetail';
      this.axios
        .get(cinemaDetail, {
          params: {
            cinemaId: this.cinemaId,
            movieId: this.movieId
          }
        }).then(res => {
          this.cinemaData = res.data.cinemaData;
          this.showData = res.data.showData;
          
        }).catch(err=>{
          console.log(err);
        })

        //电影列表
        .then(res => {
          let movieList_blueJ = "/movieOnInfoList";
          this.axios
            .get(movieList_blueJ, {
              params: {
                token: ""
              }
            })
            .then(res => {
              this.test = res.data.movieList;
              this.movieIds = res.data.movieIds;
            })
            .catch(err => {
              console.warn(err);
            });
        });
    }
  };
</script>
